package com.dnjn.happiness.survey.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dnjn.happiness.common.core.web.domain.AjaxResult;
import com.dnjn.happiness.survey.domain.SurveyTemplate;

/**
 * <p>
 * 问卷 服务类
 * </p>
 *
 * @author Amber
 * @since 2023-10-04
 */
public interface ISurveyTemplateService extends IService<SurveyTemplate> {
    /**
     * 发起问卷
     *
     * @param survey
     * @return
     */
    int saveBuiltInSurvey(SurveyTemplate survey);

    Page<SurveyTemplate> selectPageSurvey(SurveyTemplate domain, Page page);


    void endSurveyId(Long surveyId);

    void issuedSurveyId(Long surveyId);

    int updateSurvey(SurveyTemplate survey);


    Boolean deleteSurvey(Long surveyId);

    AjaxResult addCustomSurvey(SurveyTemplate survey);

    int editCustomSurvey(SurveyTemplate survey);

    SurveyTemplate getSurveyTemplateById(Long surveyId);

    SurveyTemplate getTemplateById(Long surveyId);
}
